package org.domain.seamproject.session;

import org.domain.seamproject.entity.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;

@Name("mytableHome")
public class MytableHome extends EntityHome<Mytable> {

	public void setMytableId(Integer id) {
		setId(id);
	}

	public Integer getMytableId() {
		return (Integer) getId();
	}

	@Override
	protected Mytable createInstance() {
		Mytable mytable = new Mytable();
		return mytable;
	}

	public void load() {
		if (isIdDefined()) {
			wire();
		}
	}

	public void wire() {
		getInstance();
	}

	public boolean isWired() {
		return true;
	}

	public Mytable getDefinedInstance() {
		return isIdDefined() ? getInstance() : null;
	}

}
